Network devices, such as bridges, routers, etc., forward packets through a network based on addresses, and/or other information, in the packets. A network device typically includes a plurality of ports coupled to different network links. The network device may receive a packet via one port and process address information (and/or other information) in a header of the packet to decide via which other port or ports the network switch should transmit the packet. The network device then forwards the packet to the determined one or more other ports.
Upon receiving a packet, a network device stores the packet in a packet memory (sometimes referred to as a “packet buffer”). The network device also generates a packet descriptor that includes information about the packet, such as information from a header of the packet and a location of the packet in the packet memory. The packet descriptor is typically much smaller than the packet itself. For example, packets are frequently more than 1000 bytes in length, whereas a packet descriptor is typically less than 10 bytes in length.
The packet descriptor is processed at least to determine the port or ports to which to forward the packet, and the packet descriptor is then enqueued in one or more transmit queues corresponding to the determined port or ports. When the packet descriptor reaches a head of a transmit queue, the corresponding packet is retrieved from the packet memory for forwarding to the determined port or ports.
As compared to memory used for storing packet descriptors (such as the transmit queues), the packet memory is typically much larger and is organized and/or configured for handling much larger chunks of data. For instance, the packet memory is designed for storing packets that are frequently greater than 1000 bytes in length, whereas the transmit queues are designed for storing packet descriptors that are less than 10 bytes, for example, in length.